package com.zretc.controller;

import com.zretc.entity.EmployeeMove;
import com.zretc.service.EmployeeMoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author wukai
 * @date 08-20
 */
@RestController
@RequestMapping("/employeeMove")
public class EmployeeMoveController {
    @Autowired
    private EmployeeMoveService employeeMoveService;
    @RequestMapping("/getAll")
    public List<Map<String,Object>> getAll(){
      return   employeeMoveService.getAll();
    }
    @RequestMapping("/removeSingle/{id}")
    public Integer removeSingle(@PathVariable("id") Integer id){
        return   employeeMoveService.removeSingle(id);
    }
    @RequestMapping("/addSingle")
    public Integer addSingle(@RequestBody EmployeeMove employeeMove){
        return   employeeMoveService.addSingle(employeeMove);
    }
    @RequestMapping("/modifySingle")
    public Integer modifySingle(@RequestBody EmployeeMove employeeMove){
        return   employeeMoveService.modifySingle(employeeMove);
    }

}
